package com.yishe.view;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;


public class DateFormatView {
	public static final SimpleDateFormat DEFAULT_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
	
	
	public static void getNow(){
				
		
	}
	
	public static void main(String[] args) {
		Calendar now = Calendar.getInstance();
		
		Date view = new Date();
		now.add(Calendar.MONTH, -1);
		now.set(Calendar.DAY_OF_MONTH, 1);
		view.setTime(now.getTimeInMillis());
		System.out.println(DEFAULT_DATE_FORMAT.format(view));
		
		
		now.add(Calendar.MONTH, 1);
		now.set(Calendar.DAY_OF_MONTH, -1);
		view.setTime(now.getTimeInMillis());
		System.out.println(DEFAULT_DATE_FORMAT.format(view));
	}
}
